﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using BigPang.Render;
using System.Threading;
using BigPang.Game;
using System.Threading.Tasks;
using BigPang.Common.GamePlay;

namespace BigPang
{
    public partial class MainForm : Form
    {
        Map mMap;

 

        public static Sprite mTestSprite;

        public MainForm()
        {
            InitializeComponent();
        }

        private void MainForm_Load(object sender, EventArgs e)
        {
            mMap = Map.LoadFile("./test.xml");
            mMap.Init();
        }

        private void fpsTimer_Tick(object sender, EventArgs e)
        {
            //this.Text = mFPS.ToString();
        }

        private async void MainForm_KeyDown(object sender, KeyEventArgs e)
        {
            
        }

        private async void MainForm_KeyUp(object sender, KeyEventArgs e)
        {
           
        }

        private void gameCanvas1_OnDrawFrame(object sender, EventArgs e)
        {
            GameManager.ProcessTick();

            Canvas.MainCanvas.RenderAll();
        }
    }
}
